{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chains"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Chains refer to sequences of calls - whether to an LLM, a tool, or a data preprocessing step. The primary supported way to do this is with LCEL.\n",
    "\n",
    "链是指调用序列 - 无论是对 LLM、工具还是数据预处理步骤。执行此操作的主要受支持方法是使用 LCEL。\n",
    "\n",
    "LCEL is great for constructing your chains, but it's also nice to have chains used off the shelf. There are two types of off-the-shelf chains that LangChain supports:<br>\n",
    "LCEL 非常适合构建链条，但使用现成的链条也很好。LangChain支持两种类型的现成链：\n",
    "\n",
    "1. Chains that are built with LCEL. In this case, LangChain offers a higher-level constructor method. However, all that is being done under the hood is constructing a chain with LCEL.<br>\n",
    "使用 LCEL 构建的链。在这种情况下，LangChain提供了一个更高级别的构造函数方法。然而，在引擎盖下所做的只是用 LCEL 构建一条链。\n",
    "\n",
    "2. [Legacy] Chains constructed by subclassing from a legacy Chain class. These chains do not use LCEL under the hood but are the standalone classes.<br>\n",
    "[旧版]通过从遗留Chain 类进行子类化而构造的链。这些链在引擎盖下不使用 LCEL，而是独立的类别。"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
